package cn.gd.service.systemAdministration.UploadSettings.Impl;

import cn.gd.mapper.systemAdministration.UploadSettings.UploadSettingsMapper;
import cn.gd.pojo.UploadSettings;
import cn.gd.service.systemAdministration.UploadSettings.UploadSettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UploadSettingsServiceImpl implements UploadSettingsService {

    @Autowired
    private UploadSettingsMapper mapper;

    @Override
    public UploadSettings queryUploadSettings() {
        return mapper.queryUploadSettings();
    }

    @Override
    public Boolean updateUploadSettings(UploadSettings uploadSettings) {
        boolean flag = false;
        int row = mapper.updateUploadSettings(uploadSettings);
        if(row > 0) {
            flag = true;
        }
        return flag;
    }

    @Override
    public Boolean addUploadSettings(UploadSettings uploadSettings) {
        boolean flag = false;
        int row = mapper.addUploadSettings(uploadSettings);
        if(row > 0) {
            flag = true;
        }
        return flag;
    }
}
